package com.example.esdemo.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;

import java.io.Serializable;

/**
 * @ClassName User
 * @Description TODO
 * @Author 郭敖
 * @Date 2023年10月07日 19:57
 * @Version 1.0
 */
@Document(indexName = "user_index")
@Data
public class User implements Serializable {
    private static final long serialVersionUID = -8247729974007479729L;
    @Id
    private String id;
    @Field(type = FieldType.Keyword)
    private String username;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String email;
}
